//
//  HZPreferencesModel.m
//  MyDoctor
//
//  Created by 黑眼圈 on 16/5/4.
//  Copyright © 2016年 heiyan. All rights reserved.
//

#import "HZPreferencesModel.h"

@implementation HZPreferencesModel


#pragma mark -
#pragma mark    KVC
+(instancetype)preferencesWithDict:(NSDictionary*)dict{
    
    HZPreferencesModel* model = [[HZPreferencesModel alloc]init];
    
    [model setValuesForKeysWithDictionary:dict];
    
    return model;
}


+(NSArray*)getpreferencesArray{
    
    NSString* path = [[NSBundle mainBundle]pathForResource:@"Preferences.plist" ofType:nil];
    
    NSArray* arr = [NSArray arrayWithContentsOfFile:path];
    
    NSMutableArray* arrM = [NSMutableArray array];
    
    for (NSArray* array in arr) {
        
          NSMutableArray* arrayM = [NSMutableArray array];
        
        for (NSDictionary* dict in array) {
            
            HZPreferencesModel* model = [HZPreferencesModel preferencesWithDict:dict];
            
            [arrayM addObject:model];
        }
        
        [arrM addObject:arrayM.copy];
    }
    
    return arrM.copy;
}



@end
